package com.gitee.faster.webdav.kernel.model;

import jakarta.xml.bind.JAXBElement;
import jakarta.xml.bind.annotation.XmlElementDecl;
import jakarta.xml.bind.annotation.XmlRegistry;

import javax.xml.namespace.QName;

/**
 * @author hongda.li
 */
@SuppressWarnings({"SpellCheckingInspection", "AlibabaConstantFieldShouldBeUpperCase"})
@XmlRegistry
public class ObjectFactory {
    /**
     * 引用链接
     */
    private final static QName HREF_QNAME = new QName("DAV:", "href");

    /**
     * 状态描述
     */
    private final static QName STATUS_QNAME = new QName("DAV:", "status");

    /**
     * 响应描述
     */
    private final static QName RESPONSE_DESCRIPTION_QNAME = new QName("DAV:", "responsedescription");

    public PropFind createPropfind() {
        return new PropFind();
    }

    public PropPatch createPropertyUpdate() {
        return new PropPatch();
    }

    public GetLastModified createGetLastModified() {
        return new GetLastModified();
    }

    public PropStat createPropStat() {
        return new PropStat();
    }

    public MultiStatus createMultiStatus() {
        return new MultiStatus();
    }

    public Prop createProp() {
        return new Prop();
    }

    public Remove createRemove() {
        return new Remove();
    }

    public Response createResponse() {
        return new Response();
    }

    public Collection createCollection() {
        return new Collection();
    }

    public Error createError() {
        return new Error();
    }

    public GetEtag createGetetag() {
        return new GetEtag();
    }

    public DisplayName createDisplayname() {
        return new DisplayName();
    }

    public GetContentType createGetContentType() {
        return new GetContentType();
    }

    public AllProp createAllProp() {
        return new AllProp();
    }

    public Owner createOwner() {
        return new Owner();
    }

    public Set createSet() {
        return new Set();
    }

    public PropName createPropName() {
        return new PropName();
    }

    public ResourceType createResourceType() {
        return new ResourceType();
    }

    public GetContentLength createGetContentLength() {
        return new GetContentLength();
    }

    public Message createMessage() {
        return new Message();
    }

    @XmlElementDecl(namespace = "DAV:", name = "href")
    public JAXBElement<String> createHref(String value) {
        return new JAXBElement<>(HREF_QNAME, String.class, null, value);
    }

    @XmlElementDecl(namespace = "DAV:", name = "status")
    public JAXBElement<String> createStatus(String value) {
        return new JAXBElement<>(STATUS_QNAME, String.class, null, value);
    }

    @XmlElementDecl(namespace = "DAV:", name = "responsedescription")
    public JAXBElement<String> createResponseDescription(String value) {
        return new JAXBElement<>(RESPONSE_DESCRIPTION_QNAME, String.class, null, value);
    }
}
